﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace QuanLyBepAnTuThien
{
    public partial class frmInBienBanBanGiao : Form
    {
        public frmInBienBanBanGiao()
        {
            InitializeComponent();
        }
        connect cn = new connect();
        private void frmInBienBanBanGiao_Load(object sender, EventArgs e)
        {
            Report.bienbanbangiao rp = new Report.bienbanbangiao();
            SqlCommand cmd = new SqlCommand("tblChiTietBanGiao_DS",cn.ketnoi());
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("mabienban",SqlDbType.Int)).Value = bientinhBienBanBanGiao.Mabienban;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            da.Fill(dt);
            rp.SetDataSource(dt);
            rp.SetParameterValue("nguoigiao",bientinhBienBanBanGiao.Tennguoigiao);
            rp.SetParameterValue("nguoinhan", bientinhBienBanBanGiao.Tennguoinhan);
            rp.SetParameterValue("togiao", bientinhBienBanBanGiao.Tentogiao);
            rp.SetParameterValue("tonhan", bientinhBienBanBanGiao.Tentonhan);
            rp.SetParameterValue("ngaylap1",bientinhBienBanBanGiao.Ngaylap);
            rpBienBanBanGiao_view.ReportSource = rp;
            /*
            Report.rpInDungCuNguyenLieu rp = new Report.rpInDungCuNguyenLieu();
            DataTable dt = cn.getDataTable("tblDungCu_NguyenLieu_DS");
            rp.SetDataSource(dt);
            // rp.SetParameterValue("nguoilap", "Nguyễn Hữu Phước");
            rpInDungCungNguyenLieu_fr.ReportSource = rp;
             * */
        }
    }
}
